<!-- 自带翻译的文本控件 -->

<template>
	<view>
		<text>{{ showAfter ? afterTexts : texts }}</text>
		<text class="text-btn" @click.stop="net">{{ showAfter ? '查看原文' : '翻译' }}</text>
	</view>
</template>

<script>
const NETAPI = 'https://fanyi-api.baidu.com/api/trans/vip/translate';
export default {
	props: {
		texts: {
			type: String
		}
	},
	data() {
		return {
			showAfter: false,
			afterTexts: ''
		};
	},
	methods: {
		net() {}
	}
};
</script>

<style lang="scss">
.text-btn {
	margin-left: 20upx;
	font-size: 20upx;
	opacity: 0.5;
}
</style>
